{extend name="public:common_edit"/}
{block name="main"}

<style>
    .tipStyle {
        display: none;
        position: absolute;
        background-color: #FBEC88;
        font-size: 16px;
        border-right: #D0EAF9 solid 1px;
        border-bottom: #D0EAF9 solid 1px;
        border-left: #D0EAF9 solid 1px;
        border-top: #D0EAF9 solid 1px;
    }

</style>

<div id="kyqToolTip" class="tipStyle"></div>

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i>注册记录</h3>
        </div>
        <div class="panel-body">

            <div >
                <form method="post" enctype="multipart/form-data" target="_blank" >
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>备注</td>
                                <td>付款金额</td>
                                <td>付款日期</td>
                                <td>分类</td>
                                <td>所在城市</td>
                                <td>小调查</td>
                                <td>上次登录地址</td>

                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            <tr>
                                <td>{$reg.b_id}</td>
                                <td>{$reg.remark}</td>
                                <td>{$reg.pay_money}</td>
                                <td>{$reg.create_time}</td>
                                <td>{$row.extend.register_name}</td>
                                <td>{$row.extend.city}</td>
                                <td>{$row.opinion.content}</td>
                                <td>{$row.extend.ip}{:ipToAddress($row.extend.ip)}</td>
                            </tr>

                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i>充值记录</h3>
        </div>
        <div class="panel-body">

            <div >
                <form method="post" enctype="multipart/form-data" target="_blank" >
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>备注</td>
                                <td>付款金额</td>
                                <td>首充</td>
                                <td>付款日期</td>
                            </tr>
                            </thead>
                            <tbody>
                            <p> 充值总数:{$recharge_count}  充值总金额:{$recharge_sum}</p>
                            <!-- 列表循环开始 -->
                            {volist name="recharge" id="row" key="key"}
                            <tr>
                                <td>{$row.b_id}</td>
                                <td>{$row.remark}</td>
                                <td>{$row.pay_money}</td>
                                <td>{if $row.is_first} 是 {else /} 否 {/if}</td>
                                <td>{$row.create_time}</td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i>线上邀约记录</h3>
        </div>
        <div class="panel-body">
            <div >
                <form method="post" enctype="multipart/form-data" target="_blank" >
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>接单人ID</td>
                                <td>名称</td>
                                <td>所在城市</td>
                                <td>头像</td>
                                <td>技能名</td>
                                <td>订单金额</td>
                                <td>付款方式</td>
                                <td>订单状态</td>
                                <td>下单时间</td>
                                <td>上次修改时间</td>
                            </tr>

                            </thead>
                            <tbody>
                            <tr>
                            <p> 下单总数:{$order_count}  下单总金额:{$order_sum}</p>
                            </tr>
                            <!-- 列表循环开始 -->
                            {volist name="order" id="row" key="key"}
                            <tr>
                                <td>{$row.order_id}</td>
                                <td>{$row.to_user}</td>
                                <td>{$row.user_to.nick_name}</td>
                                <td>{$row.user_to_extend.city}</td>
                                <td><img modal="zoomImg" src="{$row.user_to.header_img}" style="max-width: 100px" alt=""></td>
                                <td>{$row.skill.skill_name}</td>
                                <td>{$row.price}</td>
                                <td>{$row.pay_way_text}</td>
                                <td>{$row.status_text}</td>
                                <td>{$row.create_time}</td>
                                <td>{$row.update_time}</td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i>红包赠送记录</h3>
        </div>
        <div class="panel-body">
            <div >
                <form method="post" enctype="multipart/form-data" target="_blank" >
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>接收人ID</td>
                                <td>名称</td>
                                <td>所在城市</td>
                                <td>头像</td>
                                <td>技能名</td>
                                <td>赠送类型</td>
                                <td>红包金额</td>
                                <td>赠送时间</td>
                            </tr>

                            </thead>
                            <tbody>
                            <tr>
                                <p> 红包总数:{$chat_count}  红包总金额:{$chat_sum}</p>
                            </tr>
                            <!-- 列表循环开始 -->
                            {volist name="chat" id="row" key="key"}
                            <tr>
                                <td>{$row.id}</td>
                                <td>{$row.to_user}</td>
                                <td>{$row.user_to.nick_name}</td>
                                <td>{$row.user_to_extend.city}</td>
                                <td><img modal="zoomImg" src="{$row.user_to.header_img}" style="max-width: 100px" alt=""></td>
                                <td>{$row.form.skill.skill_name}</td>
                                <td>{if $row.form_id} 技能介绍费 {else /} 心动红包 {/if}</td>
                                <td>{$row.price}</td>
                                <td>{$row.create_time}</td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>

    </div>
{/block}
{block name="js"}

<script src="__JS__/boxImg.js" type="text/javascript" ></script>
<link rel="stylesheet" type="text/css" href="__CSS__/boxImg.css">


<script>





    var pointX;
    var pointY;

    $('.success').click(function () {
        var _that = $(this);

        layer.prompt({title: '封禁时间(小时 0为永久封禁)', formType: 0}, function(pass, index){
            layer.close(index);
            var url = $($(_that).next('.change')).data('url');
            url += '?end_time='+pass;
            $($(_that).next('.change')).data('url',url);
            $($(_that).next('.change')).click();
        });


    });

    function showTip(str){

        if(str.length > 0){
            $("#kyqToolTip").css("display","block");
            $("#kyqToolTip").css("left",pointX+10);
            $("#kyqToolTip").css("top",pointY-10);
            $("#kyqToolTip").html(str);
        }
    }

    // 添加菜单
    $(".txtstyle").bind("mouseover",function(e){
        pointX = e.pageX;
        pointY = e.pageY;
        var html = $(this).data('str');
        html = jEmoji.softbankToUnified(html);
        html = jEmoji.googleToUnified(html);
        html = jEmoji.docomoToUnified(html);
        html = jEmoji.kddiToUnified(html);
        showTip(jEmoji.unifiedToHTML(html));
    }).bind("mouseout",function(e){
        closeTip()
    }).bind("mousedown",function(e){
        closeTip()
    });

    function closeTip() {
        $("#kyqToolTip").css("display","none");
    }


    var status   = "{$Think.get.status}";
    if(status != ''){
        $('#status'+status).attr('selected',true)
    }

    var sex   = "{$Think.get.sex}";
    if(sex != ''){
        $('#sex'+sex).attr('selected',true)
    }

    var register_name   = "{$Think.get.register_name}";
    if(register_name != ''){
        $('#register_name'+register_name).attr('selected',true)
    }



    function add() {
        $("input[name='title'],input[name='name']").val('');
        $("input[name='pid']").val(0);
        $('#bjy-add').modal('show');
    }

    function customer() {
        $("input[name='title'],input[name='url'],input[name='user_id']").val('');
        $('#customer').modal('show');
    }


    $(function () {

        $.each($('.emojstext'),function (k,v) {
            var $text = $(v);
            var html = $text.html().trim().replace(/\n/g, '<br/>');
            html = jEmoji.softbankToUnified(html);
            html = jEmoji.googleToUnified(html);
            html = jEmoji.docomoToUnified(html);
            html = jEmoji.kddiToUnified(html);
            $text.html(jEmoji.unifiedToHTML(html));
        });

        var is_agent = "{$Think.get.is_agent}";
        $('#is_agent'+is_agent).attr('selected','selected')
    })

    var url = "{:url('user/user_batch')}";//批量操作

</script>

{include file="user/js" /}
{/block}




